== SYNOPSIS ==
{{{
#include <xp/bas/assert.h>

void xp_assert (int expression);
void xp_ensure (int expression);
}}}

== DESCRIPTION ==
'''''xp_assert()''''' prints an error message with the expression and aborts the program if the expression evaluates to false and XP_NDEBUG is not defined. If XP_NDEBUG is defined, the expression is not evaluated.

'''''xp_ensure()''''' behaves the same as '''''xp_assert()''''' if XP_NDEBUG is not defined. However, the expression is still evaluated if XP_NDEBUG is defined.

Beware that '''''xp_assert()''''' and '''''xp_ensure()''''' are implemented as a macro.

== EXAMPLE ==
{{{
void xp_clearcli (xp_cli_t* cli)
{
	if (cli->params != XP_NULL) {
		xp_assert (cli->nparams > 0);
		xp_free (cli->params);
		cli->nparams = 0;
		cli->params = XP_NULL;
	}
}
}}}
